<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>大学生二手交易网站</title>
	<!-- 新 Bootstrap 核心 CSS 文件 -->
	<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
	<!-- 可选的Bootstrap主题文件（一般不用引入） -->
	<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
	<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
	<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
	<nav class="navbar navbar-default">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="{% url 'home' %}">logo</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="active"><a href="{% url 'home' %}">首页<span class="sr-only">(current)</span></a></li>
        <li><a href="{% url 'add_stuff' %}">创建</a></li>
        <li><a href="{% url 'stuff_list' %}">列表</a></li>
        <li><a href="{% url 'contact' %}">联系我们</a></li>
        {% block sreach %}
        {% endblock %}
      </ul>
        
      <ul class="nav navbar-nav navbar-right">
      {% if request.user.is_authenticated %}
        <li><p class="navbar-text">欢迎你&nbsp;&nbsp;<span id="base_name">{{ user }}</span></p>
        </li>
        <li><a href="{% url 'auth_logout' %}">登出</a></li>
        {% else %}
        <li><a href="{% url 'auth_login' %}">登陆</a></li>
        <li><a href="{% url 'registration_register' %}">注册</a></li>
      {% endif %}
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
	<div class="container">
		{% include 'message.html' %}
	
		

		{% block content %}
		{% endblock %}
	</div>
</body>
</html>